#ifndef __FILE_H__
#define __FILE_H__

#include "global.h"

#define FS_VOLUME_SD        "0:"
#define CONF_FILE_NAME      "0:sm.conf"
#define MAX_FILE_LIST_SZ    256
#define FILE_LIST_ROWS      8



typedef struct g_file
{
    char f_name[MAX_FILE_NAME_SZ];
    uint8_t f_type;	//dir or file
    uint32_t f_size; //byte
} FileListST;

extern FATFS fatfs;
extern FileListST fileList[MAX_FILE_LIST_SZ];//char fileList[MAX_FILE_LIST_SZ][MAX_FILE_NAME_SZ];

extern int currentFile;

void FileInit(void);
void readFileList(void);
void drawFileList(void);
uint32_t GetFileLineNum(char* file);

#endif


